package cn.xaut.XAUT迎春杯预热;

import java.util.Arrays;
import java.util.Scanner;

/**
 * M - 单词排序
 */
public class demoM {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        String[] words = new String[n];
        for (int i = 0; i < n; i++) 
            words[i] = input.next();
        Arrays.sort(words);
        for (String s : words)
            System.out.print(s + " ");
        System.out.println();
    }
}
